
async function aa(){


const { Client } = require('pg')
const client = new Client({
    user: 'postgres',
    host: 'localhost',
    database: 'hello',
    password: 'root',
    port: 5432,
})

await client.connect()

const res = await client.query('select id,sum(num) from orders11 group by id')
console.log(res.rows) // Hello world!
await client.end()

}
aa();